package com.lzq.leetcode.alg;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.PriorityQueue;

public class MyPrioryQueue<T> extends ArrayList<T> {

    Comparator<T> comparator;

    @Override
    public boolean add(T t) {
        super.add(t);
        // 比较
        int cur = size() - 1;
        boolean changed = true;
        while (changed) {
            int parent = cur / 2;
            T curVal = get(cur);
            T parentVal = get(parent);

            PriorityQueue<Integer> minQueue = new PriorityQueue<>((i1, i2) -> i1-i2);
        }
        return true;
    }
}
